<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="perm" uri="/WEB-INF/tld/perm.tld"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<html>
<script>
	var ctx = "${ctx}";
</script>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>订单评价</title>
<meta name="keywords" content="">
<meta name="description" content="">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
<meta http-equiv="expires" content="Wed, 26 Feb 209908:21:57 GMT">

<link href="${ctx}/static/css/bootstrap.min.css?v=${static_version}"
	rel="stylesheet" />
<link
	href="${ctx}/static/css/font-awesome.min.css?v=4.4.0?v=${static_version}"
	rel="stylesheet" />
<link href="${ctx}/static/css/animate.min.css?v=${static_version}"
	rel="stylesheet" />
<link href="${ctx}/static/css/style.min.css?v=${static_version}"
	rel="stylesheet" />
<link href="${ctx}/static/css/common.css?v=${static_version}"
	rel="stylesheet" />
<link href="//at.alicdn.com/t/font_9x03jhokyws9vn29.css"
	rel="stylesheet" />
	<link href="${ctx}/static/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
<!-- Data Tables -->
<link
	href="${ctx}/static/css/plugins/dataTables/dataTables.bootstrap.css"
	rel="stylesheet">

</head>
<body class="gray-bg">
	<div class="wrapper wrapper-content  animated fadeInRight">
		<div class="ibox float-e-margins">

			<!-- 我的评价列表 -->
			<div class="ibox-title">
				<h5>
					订单评价<small></small>
				</h5>
				<a class="btn btn-refresh" style="display:none" onclick="javascript:location.replace(location.href);" href="javascript:location.replace(location.href);" title="刷新">刷新</a>
			
			</div>

			<div class="ibox-content">

				<div class="row">
					<form action="${ctx}/dingdan/dianPingList" class="form-group" id="packets_table_form">

						<div class="col-md-2">
							<input name="keyword" type="text" placeholder="请输入关键字"
								class="form-control" />
						</div>
						<div class="col-md-4">
							<div class="input-daterange input-group">
								<input id="startTime" type="text"
									class="input-md form-control layer-date" placeholder="开始时间"
									name="startTime" onclick="new WdatePicker()"> <span class="input-group-addon">至</span>
								<input id="endTime" type="text"
									class="input-md form-control layer-date" placeholder="结束时间"
									name="endTime" onclick="new WdatePicker()">
							</div>
						</div>
						
						<!-- <div class="col-md-3 col-sm-3">
					<span class="select-box"> <select name="hfStatus"
						class="input-md form-control chosen-select">
							<option value="-1">--全部--</option>
							<option value="0">--待回复--</option>
							<option value="1">--已回复--</option>
					</select>
					</span>
				</div> -->
						<!-- <div class="col-md-3">
						<label class="col-sm-5 control-label">用户名</label>
						<div class="col-sm-7">
							<input type="text" name="scName" value=""
								id="name" placeholder="请输入用户名" class="form-control">
						</div>
					</div> -->
						<div class="col-md-1 col-sm-2">
							<button id="packets_table_search" type="submit"
								class="btn btn-primary">查询</button>
						</div>

					</form>
				</div>
				<div class="hr-line-dashed3"></div>

				<table id="packets_table" 
					class="table table-striped table-bordered table-hover dataTables-example">
					<thead>
						<tr>
							<th width="30">订单编号</th>
							<th width="60"class="text-center">用户名</th>
								<th width="80">商品名称</th>
							<th width="80">评价等级</th>
							<th width="80">评价内容</th>
							<th width="60">评价时间</th>
							<th width="60">处理状态</th>
							<th width="60">操作</th>
						</tr>
					</thead>
					<tbody>
						<c:forEach items="${orderDianPingList}" var="dp">
							<tr class="gradeC">
								<%-- <input type="hidden" id="id" name="id" value='${u_bonus.id}' /> --%>
								<td>${dp.C_ORDERID}</td>
								<td>${dp.C_NICK}</td>
								<td>${dp.NAME}</td>
								<td>${dp.C_DTYPE}</td>
								<td>${dp.C_TEXT}</td>
								<td>${dp.C_APPDATE}</td>
								<td>
								 <c:choose>
									<c:when test="${dp.C_RETEXT!=null}">
									已处理
									</c:when>
									<c:otherwise>
									未处理
									</c:otherwise>
									</c:choose> 
								</td>
							
								<td class="text-center">
								<a class="btn btn-danger"
									onClick="dp_delete(this,'${dp.C_ID}')"
									href="javascript:void(0);" title="删除">删除</a>
									</td>
							</tr>
						</c:forEach>
					</tbody>
				</table>
				<div class="row">
					<div class="col-md-6" class="pull-left" id="page_left_text"></div>
					<div class="col-md-6" id="page_text"></div>
				</div>
			</div>
		</div>

	</div>

	<script src="${ctx}/static/js/jquery.min.js?v=${static_version}"></script>
	<script src="${ctx}/static/js/bootstrap.min.js?v=${static_version}"></script>
	<script
		src="${ctx}/static/js/plugins/layer/layer.js?v=${static_version}"></script>
	<script
		src="${ctx}/static/js/plugins/dataTables/jquery.dataTables.js?v=${static_version}"></script>
	<script
		src="${ctx}/static/js/plugins/dataTables/dataTables.bootstrap.js?v=${static_version}"></script>
	<script src="${ctx}/static/js/pingpp.js"></script>
	<script src="${ctx}/static/js/My97DatePicker/WdatePicker.js?v=${static_version}"></script>
	<script>
		$(document).ready(function() {
			$(".dataTables-example").dataTable();
		});

		/*编辑*/
		function u_bonus_edit(obj, id) {
			var index = layer.open({
				type : 2,
				title : '红包广告编辑',
				shadeClose : true,
				shade : 0.8,
				content : "${ctx}/advert_bonusadvert-addOrUpdate?id=" + id
			});
			layer.full(index);
		}

		/*软删除*/
		function dp_delete(obj, id) {
			layer.confirm('确认删除？', {
				btn : [ '确认', '取消' ],
				shade : false
			}, function() {
				$.ajax({
					type : "POST",
					url : "${ctx}/dingdan/dp-delete",
					data : "dpId=" + id,
					error : function() {
						layer.msg('操作失败', {
							icon : 5,
							time : 1000
						});
					},
					success : function(msg) {
						layer.msg('已删除 ' + msg.information, {
							icon : 6,
							time : 1000
						});
						location.reload();
					}
				});
			}, function() {
				layer.msg('未删除', {
					icon : 5,
					time : 1000
				});
			});
		}
	</script>
</body>
</html>